import * as index from '@/api/index.js'
export default {
	data() {
		return {
			list: [],
			form: {
				pages: 1,
				limit: 10,
				title: ''
			}
		}
	},
	computed: {
		assetUrl() {
			return this.$tools.baseURL;
		},
	},
	onShow() {},
	onLoad(option) {
		this.getsyList()
	},
	onReachBottom() {
		this.form.pages += 1
		this.getsyList()
	},
	methods: {
		jump(item) {
			this.$tools.navigate('/pages/community/detail/index?id=' + item.id)
		},
		getsyList() {
			index.getsyList(this.form).then(res => {
				this.list.push(...res.page)
			})
		},
		search() {
			this.form.pages = 1
			this.list = []
			this.getsyList()
		},
		close() {
			this.form.pages = 1
			this.list = []
			this.form.title = ''
			this.getsyList()
		}
	}
}